<!--添加禁止ip-->
<div class="dialog_content">
	<form id="info_form" action="{:url('Badip/addDo')}" method="post">
	<table width="100%" class="table_form">
		<tr> 
			<th width="60">ip :</th>
			<td>
				<input type="text" class="input-text" name="ip" id="ip" size="30"><span>可以填写ip段</span>
			</td>
		</tr>
		<tr>
			<th>封禁天数 :</th>
			<td><input type="text" name="expires" id="expires" value="0" class="input-text" size="30"><span>0表示永久封禁</span></td>
		</tr>

        <tr>
		<th>状态 :</th>
            <td>
                <label><input type="radio" name="status" value="1" checked="checked"> 启用</label>&nbsp;&nbsp;
                <label><input type="radio" name="status" value="0"> 禁用</label>
            </td>
        </tr>
	</table>
	</form>
</div>
<script>
$(function(){
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#ip").formValidator({onshow:'请填写禁止IP',onfocus:'请填写禁止IP'}).inputValidator({min:1,onerror:'请填写禁止IP'});
	
	$('#info_form').ajaxForm({success:complate,dataType:'json'});
	function complate(result){
		if(result.status == 1){
			$.dialog.get(result.dialog).close();
			$.yingloujie.tip({content:result.msg});
			setTimeout(function(){window.location.reload();},1000);
		} else {
			$.yingloujie.tip({content:result.msg, icon:'alert'});
		}
	}
});

</script>